package com.JavaBasic;

import java.util.Enumeration;
import java.util.Vector;

public class VectorDemo {
	public static void main(String[] args) {
		// Vector集合添加元素
		Vector<String> vc1 = new Vector<String>();
		vc1.add("a");
		vc1.addElement("b");
		vc1.addElement("c");
		System.out.println("添加完元素集合vc1=" + vc1);
		
		// Vector集合枚举
		Enumeration<String> enumeration = vc1.elements();
		System.out.println("枚举vc1:");
		while(enumeration.hasMoreElements()) {
			String string = enumeration.nextElement();
			System.out.println(string);
		}
	}
}
